#ifndef ADM_ELEMENT_H_
#define ADM_ELEMENT_H_
#include <iostream>
#include <cmath>
#include "adm_matrix.h"
namespace Andromeda {
  typedef enum {
    ZPlane = 0,
    YPlane ,
    XPlane 
  } PlaneMode;
  class Color {
    public :
      Color(uint r=0, uint g=0, uint b=0)  {
         R_ = r;
         G_ = g;
         B_ = b;
      }
      ~Color() {

      }
    private :
      unsigned int R_;
      unsigned int G_;
      unsigned int B_;
  };

  class Line {
    public :
      Line () {
        c0_ = Color(200, 100, 10);
        c1_ = Color(200, 200, 200);
      }
      ~Line() {
    
      }
      void setPoint(int i, vec4 point) {
        if (i==0)
          p0_ = point;
        else 
          p1_ = point;
      }
      int getNumPixel(PlaneMode plane) {
        float delta_0;
        float delta_1;
        int res;
        switch (plane) {
          case ZPlane : 
            delta_0 = abs( p1_[0] - p0_[0]);
            delta_1 = abs( p1_[1] - p0_[1]);
            res =(int) delta_0 > delta_1 ? delta_0 : delta_1;
            break; 
          case YPlane : 
            delta_0 = abs( p1_[0] - p0_[0]);
            delta_1 = abs( p1_[2] - p0_[2]);
            res =(int) delta_0 > delta_1 ? delta_0 : delta_1;
            break; 
          case XPlane : 
            delta_0 = abs( p1_[1] - p0_[1]);
            delta_1 = abs( p1_[2] - p0_[2]);
            res =(int) delta_0 > delta_1 ? delta_0 : delta_1;
            break; 
        }
        return res;
      }
    private :
      vec4  p0_;
      vec4  p1_;
      Color c0_;
      Color c1_;
  };

  class Triangles {

  };

}
#endif
